<template>
    <div>
        home
        <hr>
        <h3>点击次数：{{count}}，是{{oddOrEven}}</h3>
        <button @click="Ajia">加</button>
        <button @click="Ajian">减</button>
        <button @click="Aevenjia">偶数才加</button>
        <button @click="Atimejia">延时加一</button>
    </div>
</template>

<script>
import {mapState,mapMutations,mapGetters,mapActions} from 'vuex'
export default {
    computed:{
        ...mapState(['count']),
        ...mapGetters(['oddOrEven'])
    },
    methods:{
        ...mapMutations(['jia','jian']),
        ...mapActions(['Ajia','Ajian','Aevenjia','Atimejia'])
    },
    mounted(){
        // console.log(this.$store);
    }
}
</script>

<style>

</style>
